<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>测试</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
  </head>
  <body>
    <form action="" method="post">
      <input type="text" name="username" id="" />
      <input type="text" name="password" id="" />
      <input type="submit" value="注册" id="reg" />
    </form>
    <form action="" method="post">
      <input type="text" name="username" id="" />
      <input type="text" name="password" id="" />
      <input type="submit" value="登录" id="login" />
    </form>
    <button id="getUser">获取用户信息</button>
    <script>
      $("#getUser").click(function () {
        $.get("http://localhost:8888/api/aaa", function (data) {
          console.log(data);
        });
      });
    </script>
  </body>
</html>
